
cc.Class({
    extends: cc.Component,

    properties: {
        colorType:null
    },
    onLoad () {
        this.tt = this.node.getComponent(cc.Sprite).spriteFrame;
        cc.director.getCollisionManager().enabled = true;
        // cc.director.getCollisionManager().enabledDebugDraw = true;
    },
    onCollisionEnter:function(other,self){
        if(self.tag != 0){
            return;
        }
        if(other.tag == 1 || other.tag == 2 || other.tag == 3 || other.tag == 4 || other.tag == 5){
            self.node.getComponent(cc.Sprite).spriteFrame = other.node.getComponent(cc.Sprite).spriteFrame;
        }
    },
    onCollisionStay:function(other,self){

    },
    onCollisionExit:function(other,self){
        self.node.getComponent(cc.Sprite).spriteFrame = this.tt;
    }

    // start () {
    //
    // },

    // update (dt) {},
});
